package task;

import javax.crypto.spec.PSource;

public class NewGame {
    //某公司要开发新游戏,使用面向对象的思想设计英雄类(Hero)，怪兽类(Monster)和武器类(Weapon)。
    public static class Hero{
        String race;
        String name;
        int healthPiont;
        public void showInfo(){
            System.out.println(race+"类");
            System.out.println("我是"+race+",我的基本信息如下：");
            System.out.println("名字："+name+",生命值："+healthPiont);
            System.out.println("-----------------------------------------------");
        }
    }
    public static class Weapon{
        String race;
        String name;
        int ATK;
        public void showInfo(){
            System.out.println(race+"类");
            System.out.println("我是"+race+",我的基本信息如下：");
            System.out.println("名字"+name+",攻击力："+ATK);
            System.out.println("------------------------------------------------");
        }
    }
    public static class Monster{
        String race;
        String name;
        int healthPiont;
        String type;
        public void showInfo(){
            System.out.println(race+"类");
            System.out.println("我是"+race+",我的基本信息如下：");
            System.out.println("名字："+name+",生命值："+healthPiont+",类型："+type);
        }


    }
}
